package com.sinocare.project.common.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * 角色表(SccRole)表实体类
 *
 * @author makejava
 * @since 2021-12-20 19:04:19
 */
@Data
@SuppressWarnings("serial")
@TableName(value = "scc_role")
public class SccRole extends Model<SccRole> {
    //主键、角色id
    @TableId(value = "role_id",type = IdType.AUTO)
    private Integer roleId;
    //客户编号
    private String customerCode;
    //角色名
    private String roleName;
    //角色描述
    private String roleDesc;
    //备注
    private String remark;
    //状态(0禁用1正常，默认1)
    private Integer status;
    //创建时间(默认系统时间)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date createTime;
    //更改时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date updateTime;
    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.roleId;
    }
}

